package com.jiangfan.tank;

import java.io.IOException;
import java.util.Properties;

/**
 * 配置文件config管理
 */
public class PropertyMgr {
    static Properties props = new Properties();

    static {
            try{
                props.load(PropertyMgr.class.getClassLoader().getResourceAsStream("config"));
            } catch (Exception e) {
                e.printStackTrace();
            }
    }

    public static Object get(String key) {
        if(props == null) return null;
        return props.get(key);
    }

    public static void main(String[] args) {
        System.out.println(PropertyMgr.get("initialCount"));
    }
}
